package com.maxlen.goods.entity.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CategoryByLimitTenDTO implements Serializable{
    private static final long serialVersionUID = 1L;

    /**
     * 分类id
     */
    private Long catId;

    /**
     * 分类名称
     */
    private String name;

    /**
     * 父分类id
     */
    private Long parentCid;

    /**
     * 层级
     */
    private Integer catLevel;

    /**
     * 子分类
     */
    // 设置此字段为空时不写入 json
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<CategoryByLimitTenDTO> children;

}
